package net.xiaoyu233.mitemod.miteite.inventory.container;

import net.minecraft.EntityPlayer;
import net.minecraft.IInventory;
import net.minecraft.ItemStack;
import net.minecraft.Slot;


public class SoltFusionmine extends Slot {

    int slotIndex;
    ContainerFusionmine containerFusionmine;

    public SoltFusionmine(ContainerFusionmine containerFusionmine, IInventory inventory, int slot_index, int display_x, int display_y) {
        super(inventory, slot_index, display_x, display_y);
        this.setContainer(containerFusionmine);
        this.slotIndex = slot_index;
        this.containerFusionmine = containerFusionmine;
    }


    @Override
    public void onSlotChanged() {
        super.onSlotChanged();

    }

    public int getSlotStackLimit() {
        return 64;
    }

    @Override
    public boolean isItemValid(ItemStack par1ItemStack) {
        if (this.slotIndex == 4) {
            return false;
        } else {
            return true;
        }
    }

    @Override
    public boolean canTakeStack(EntityPlayer par1EntityPlayer) {
        return !this.containerFusionmine.getTileEntityFurnace().getInsynthesis();
    }
}
